<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./js/vue.js"></script>
</head>

<body>
    <div id="app">
        //凡是没有使用v-bind绑定的都是string类型
        <hello-age :age-list="age" :flag-list="flag" :fruit-arr="fruitArr" obj="obj"></hello-age>
    </div>
    <script>
        Vue.component('hello-age', {
            props: ['ageList', 'flagList', 'fruitArr', 'obj'],
            data: function() {
                return {

                }
            },
            template: `
            <div>
                <p>{{typeof ageList}}</p>
                <p>{{typeof flagList}}</p>
            </div>
            `
        })
        var vm = new Vue({
            el: '#app',
            data: {
                age: 3,
                flag: true,
                fruitArr: ['apple', 'pear', 'orange'],
                obj: {
                    id: 1,
                    name: 'tom',
                    friend: 'jerry'
                }
            }
        })
    </script>
</body>

</html>